package com.example.multilevelapprovalback.controller;

import com.example.multilevelapprovalback.pojo.Result;
import com.example.multilevelapprovalback.pojo.Role;
import com.example.multilevelapprovalback.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 角色管理
 */


@RestController
public class RoleController {
    @Autowired
    private RoleService roleService;

    @GetMapping("/role")
    //查询所有角色
    public Result getAllRole() {
        List<Role> list = roleService.getAllRole();
        return Result.success(list);
    }
}
